(comint-filter): Increment opoint only if after insertion point.
authorRichard M. Stallman <rms@gnu.org>
Wed, 12 May 1993 20:32:32 +0000 (20:32 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 12 May 1993 20:32:32 +0000 (20:32 +0000)
lisp/comint.el

index 5c0d27ccb8910855811ff455bd3592fd1f5adb64..0d49cba5590510646ff3b3ff426e34f9f81f32dd 100644 (file)
@@ -662,7 +662,8 @@ Similarly for Soar, Scheme, etc."
          (nchars (length string)))
       (widen)
       (goto-char (process-mark process))
-      (setq opoint (+ opoint nchars))
+      (if (<= (point) opoint)
+         (setq opoint (+ opoint nchars)))
       ;; Insert after old_begv, but before old_zv.
       (if (< (point) obeg)
          (setq obeg (+ obeg nchars)))